package com.sc.nft.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.MallActivityShareTeam;
import com.sc.nft.entity.MallOrder;
import com.sc.nft.entity.MallShareTeamOrder;
import com.sc.nft.entity.dto.AdminMallShareTeamOrderPageDTO;
import com.sc.nft.entity.dto.MallShareTeamOrderPageDTO;
import com.sc.nft.entity.vo.AdminMallShareTeamOrderPageVO;
import com.sc.nft.entity.vo.MallShareTeamOrderPageVO;

import java.util.List;

/**
 * <p>
 * 分享购团队订单 服务类
 * </p>
 *
 * @author ligen
 * @since 2023-12-13
 */
public interface MallShareTeamOrderService {

    /**
     * 成团订单列表
     *
     * @param adminMallShareTeamOrderPageVO
     * @return
     */
    Page<AdminMallShareTeamOrderPageDTO> getAdminMallShareTeamOrderPageDTO(AdminMallShareTeamOrderPageVO adminMallShareTeamOrderPageVO);


    /**
     * 用户端拼团订单列表
     *
     * @param mallShareTeamOrderPageVO
     * @return
     */
    Page<MallShareTeamOrderPageDTO> getMallShareTeamOrderPageDTO(MallShareTeamOrderPageVO mallShareTeamOrderPageVO);

    /**
     * 创建成团订单
     *
     * @param activityShareTeamId 分享购团队ID
     * @param mallOrder           订单
     */
    void create(Long activityShareTeamId, MallOrder mallOrder);

    /**
     * 获取订单的分享团订单信息
     *
     * @param shareTeamId
     * @param orderId
     * @return
     */
    MallShareTeamOrder getByOrderId(Long shareTeamId, Long orderId);

    /**
     * 获取是否可以发收益的成团订单
     *
     * @param isCanIssue
     * @return
     */
    List<MallShareTeamOrder> getTeamOrderByIsCanIssue(Long teamId, Boolean isCanIssue);

    /**
     * 分享活动团队收益结算
     *
     * @param mallActivityShareTeam
     */
    void shareTeamIncomeSettlement(MallActivityShareTeam mallActivityShareTeam);
}
